#!/bin/bash

# curl https://rclone.org/install.sh | bash

# manually download

read -p "confirm rclone zip file exists"

if [ ! -e ~/rclone-*-linux-amd64.zip ]; then
    echo "rclone doesn't exist, exit."
    exit
fi

cd ~
unzip rclone-*-linux-amd64.zip
cd rclone-*-linux-amd64
cp rclone /usr/local/bin/
chown root:root /usr/local/bin/rclone
chmod 755 /usr/local/bin/rclone
cd ~
rm -r ~/rclone-*
